package org.oos.dao.options;

import com.google.api.client.util.Key;

public class OrderOptions extends OptionsMap {

	@Key("order")
	private String order;

	public void setOrder(Criteria criteria) {
		this.order = criteria.toString().toLowerCase();
	}

	public Criteria getOrder() {
		return Criteria.valueOf(order.toUpperCase());
	}

	@Override
	public void clear() {
		order = null;
	}
	
	public enum Criteria {
		CONTENT, RATING, DATE, CONTACTS, DISTANCE;
	}
}
